package com.ykdl.member.kid.beans;

import java.io.Serializable;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.ykdl.member.kid.models.FileMetas;

import net.wxxr.http.interfaces.IJsonParser;

public class BabyProfileBean implements Serializable ,IJsonParser{
	
	/** "baby_name": "xiaoxiao1",
                "birthday": 1388047495,
                "blood_type": "A",
                "born_height": 22,
                "born_weight": 960,
                "gender": 1,
                "modified_time": 1393324763.743993,
                "user_id": 25
	 * 
	 */
	private String baby_name ;
	private float birthday ;
	private String blood_type ;
	private String born_height ;
	private String born_weight ;
	private int gender ;
	private float modified_time ;
	private int user_id ;
	private FileMetas avatar;
	
	public FileMetas getAvatar() {
		return avatar;
	}

	public void setAvatar(FileMetas avatar) {
		this.avatar = avatar;
	}

	public String getBaby_name() {
		return baby_name;
	}

	public void setBaby_name(String baby_name) {
		this.baby_name = baby_name;
	}

	public float getBirthday() {
		return birthday;
	}

	public void setBirthday(float birthday) {
		this.birthday = birthday;
	}

	public String getBlood_type() {
		return blood_type;
	}

	public void setBlood_type(String blood_type) {
		this.blood_type = blood_type;
	}

	public String getBorn_height() {
		return born_height;
	}

	public void setBorn_height(String born_height) {
		this.born_height = born_height;
	}

	public String getBorn_weight() {
		return born_weight;
	}

	public void setBorn_weight(String born_weight) {
		this.born_weight = born_weight;
	}

	public int getGender() {
		return gender;
	}

	public void setGender(int gender) {
		this.gender = gender;
	}

	public float getModified_time() {
		return modified_time;
	}

	public void setModified_time(float modified_time) {
		this.modified_time = modified_time;
	}

	public int getUser_id() {
		return user_id;
	}

	public void setUser_id(int user_id) {
		this.user_id = user_id;
	}

	private static final long serialVersionUID = 6875822529535038396L;

	@Override
	public IJsonParser parse(String json) throws Exception {
		// TODO Auto-generated method stub
		Gson   gson = null;
		if(null != json){
			GsonBuilder b = new GsonBuilder();
			gson  = b.create();
			return gson.fromJson(json, BabyProfileBean.class);
		}
		return null;
	}

}
